package cn.xyy.jdbc;

import cn.xyy.jdbc.page.ISQLPageHandle;
import cn.xyy.jdbc.support.AbstractJdbcSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

/**
 * 主数据源 Dao数据持久基类
 * 
 * @author xyy
 *
 */
@Component
public class BaseDao extends AbstractJdbcSupport {

	@Autowired
	@Qualifier("baseJdbcTemplate")
	private JdbcTemplate baseJdbcTemplate;

	/**
	 * 分页处理
	 */
	@Autowired
	@Qualifier("mysqlSQLPageHandle")
	protected ISQLPageHandle mysqlSQLPageHandle;

	@Override
	protected JdbcTemplate getJdbcTemplate() {
		return this.baseJdbcTemplate;
	}

	protected ISQLPageHandle getSqlPageHandle() {
		return mysqlSQLPageHandle;
	}

}
